package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;

/**
 * 随访表单
 * 
 * @author yangfuya
 * @since 2022/1/5
 */
@Data
@Entity
@Table(name = "dr_follow_up_form")
public class DrFollowUpForm implements Serializable {

    private static final long serialVersionUID = -5722504568611769288L;
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 表单id
     */
    @Column(name = "form_id")
    private String formId;

    /**
     * 表单名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 所属医生，为0时表示为所有医生共享
     */
    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * 表单类型，从字典拿
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 状态 0.开启 1.关闭
     */
    @Column(name = "status")
    private Integer status;

    /**
     * 删除标记 0:正常 1:删除
     */
    @Column(name = "del_flag")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 版本号
     */
    @Version
    @Column(name = "version")
    private Integer version;

}
